package org.yate.oa.service.imp;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.dao.mapper.PerformanceMapperU;
import org.yate.oa.model.PerformanceEntityU;
import org.yate.oa.service.IPerformanceServiceU;
import org.yate.oa.utils.Pagination;

@Service
public class PerformanceServiceU extends BaseService<PerformanceEntityU, Integer> implements IPerformanceServiceU {
	@Resource(name = "performanceMapperU")
	private PerformanceMapperU performanceDaoU;

	@Override
	protected IBaseMapperDao<PerformanceEntityU, Integer> getMapperDao() {
		return this.performanceDaoU;
	}

	@Override
	public Pagination<PerformanceEntityU> getEntitieSearch(int idx, int size, String orderField, String orderMode, final Map<String, Object> map) {
		Pagination<PerformanceEntityU> result = new Pagination<PerformanceEntityU>(idx, size);
		result.setRows(this.performanceDaoU.getEntitieSearch(result, orderField, orderMode, map));
		return result;
	}

	@Override
	public List<PerformanceEntityU> getEntitieSearch(Map<String, Object> map) {
		return this.performanceDaoU.getEntitieSearch(map);
	}

	@Override
	public void updateEntitiesBy(Map<String, Object> map) {
		this.performanceDaoU.updateEntitiesBy(map);
	}

}
